home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4945 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: mail2news.demon.co.uk!hpl3sn03.cern.ch
  2. From: Dan Pop <danpop@mail.cern.ch>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: What does the -O option do???!!!
  5. Date: Sun, 11 Feb 1996 00:32:18 +0100
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <9602102332.AA09466@dxmint.cern.ch>
  8. References: <4ehger$cj9@mark.ucdavis.edu> <4emlsq$odt@airdmhor.gen.nz> <pronet01.34.003B9BB5@indirect.com> <823827008snz@genesis.demon.co.uk> <4fiphrINNrvr@keats.ugrad.cs.ubc.ca>
  9. X-NNTP-Posting-Host: hpl3sn03.cern.ch
  10. X-Newsreader: NN version 6.5.0 #7 (NOV)
  11. X-Mail2News-Path: dxmint.cern.ch!hpl3sn03.cern.ch
  12.  
  13. c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) writes:
  14.  
  15. >... as long as it is not hard-coded to treat identifiers like "free" specially. 
  16.  
  17. A compiler is free to treat identifiers like "free" specially after the
  18. relevant header has been included.
  19.  
  20. >If you write your own free() with different semantics, you would not want the
  21. >compiler messing with that. 
  22.  
  23. If you write your own free() you invoke undefined behaviour and you can't
  24. expect the compiler to behave in a sensible way.  The implementation 
  25. namespace is a big taboo in C.
  26.  
  27. >It's just another function, after all.
  28.  
  29. No, it isn't.  Have a look at the standard.
  30.  
  31. >Some
  32. >compilers have special directives that you can apply to function prototypes
  33. >that give a hint to the compiler (for example, hints like "this function does
  34. >not return, so you may treat client code accordingly").
  35.  
  36. Once you do this you have already left the realms of the C language.
  37.  
  38. Dan
  39. -- 
  40. Dan Pop
  41. CERN, CN Division
  42. Email: danpop@mail.cern.ch 
  43. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  44.